Optimal. Leaf size=217 \[ \frac {(19 A+8 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{4 a^{3/2} d}-\frac {(13 A+5 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {(7 A+2 C) \sin (c+d x)}{4 a d \sqrt {a \sec (c+d x)+a}}+\frac {(2 A+C) \sin (c+d x) \cos (c+d x)}{2 a d \sqrt {a \sec (c+d x)+a}}-\frac {(A+C) \sin (c+d x) \cos (c+d x)}{2 d (a \sec (c+d x)+a)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.59, antiderivative size = 217, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4085, 4022, 3920, 3774, 203, 3795} \[ \frac {(19 A+8 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{4 a^{3/2} d}-\frac {(13 A+5 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {(7 A+2 C) \sin (c+d x)}{4 a d \sqrt {a \sec (c+d x)+a}}+\frac {(2 A+C) \sin (c+d x) \cos (c+d x)}{2 a d \sqrt {a \sec (c+d x)+a}}-\frac {(A+C) \sin (c+d x) \cos (c+d x)}{2 d (a \sec (c+d x)+a)^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 3774
Rule 3795
Rule 3920
Rule 4022
Rule 4085
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx &=-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {\int \frac {\cos ^2(c+d x) \left (-2 a (2 A+C)+\frac {1}{2} a (5 A+C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{2 a^2}\\ &=-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac {(2 A+C) \cos (c+d x) \sin (c+d x)}{2 a d \sqrt {a+a \sec (c+d x)}}-\frac {\int \frac {\cos (c+d x) \left (a^2 (7 A+2 C)-3 a^2 (2 A+C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{4 a^3}\\ &=-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {(7 A+2 C) \sin (c+d x)}{4 a d \sqrt {a+a \sec (c+d x)}}+\frac {(2 A+C) \cos (c+d x) \sin (c+d x)}{2 a d \sqrt {a+a \sec (c+d x)}}-\frac {\int \frac {-\frac {1}{2} a^3 (19 A+8 C)+\frac {1}{2} a^3 (7 A+2 C) \sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{4 a^4}\\ &=-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {(7 A+2 C) \sin (c+d x)}{4 a d \sqrt {a+a \sec (c+d x)}}+\frac {(2 A+C) \cos (c+d x) \sin (c+d x)}{2 a d \sqrt {a+a \sec (c+d x)}}-\frac {(13 A+5 C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{4 a}+\frac {(19 A+8 C) \int \sqrt {a+a \sec (c+d x)} \, dx}{8 a^2}\\ &=-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {(7 A+2 C) \sin (c+d x)}{4 a d \sqrt {a+a \sec (c+d x)}}+\frac {(2 A+C) \cos (c+d x) \sin (c+d x)}{2 a d \sqrt {a+a \sec (c+d x)}}+\frac {(13 A+5 C) \operatorname {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{2 a d}-\frac {(19 A+8 C) \operatorname {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{4 a d}\\ &=\frac {(19 A+8 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{4 a^{3/2} d}-\frac {(13 A+5 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {(7 A+2 C) \sin (c+d x)}{4 a d \sqrt {a+a \sec (c+d x)}}+\frac {(2 A+C) \cos (c+d x) \sin (c+d x)}{2 a d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 27.04, size = 11995, normalized size = 55.28 \[ \text {Result too large to show} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 5.79, size = 631, normalized size = 2.91 \[ \left [-\frac {\sqrt {2} {\left ({\left (13 \, A + 5 \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (13 \, A + 5 \, C\right )} \cos \left (d x + c\right ) + 13 \, A + 5 \, C\right )} \sqrt {-a} \log \left (-\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, a \cos \left (d x + c\right )^{2} - 2 \, a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + {\left ({\left (19 \, A + 8 \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (19 \, A + 8 \, C\right )} \cos \left (d x + c\right ) + 19 \, A + 8 \, C\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} + 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) - 2 \, {\left (2 \, A \cos \left (d x + c\right )^{3} - 3 \, A \cos \left (d x + c\right )^{2} - {\left (7 \, A + 2 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{8 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}}, \frac {\sqrt {2} {\left ({\left (13 \, A + 5 \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (13 \, A + 5 \, C\right )} \cos \left (d x + c\right ) + 13 \, A + 5 \, C\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left ({\left (19 \, A + 8 \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (19 \, A + 8 \, C\right )} \cos \left (d x + c\right ) + 19 \, A + 8 \, C\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) + {\left (2 \, A \cos \left (d x + c\right )^{3} - 3 \, A \cos \left (d x + c\right )^{2} - {\left (7 \, A + 2 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{4 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 5.65, size = 539, normalized size = 2.48 \[ -\frac {\frac {\sqrt {2} {\left (13 \, A + 5 \, C\right )} \log \left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2}\right )}{\sqrt {-a} a \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} + \frac {{\left (19 \, A + 8 \, C\right )} \log \left (\frac {{\left | 147573952589676412928 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - 295147905179352825856 \, \sqrt {2} {\left | a \right |} - 442721857769029238784 \, a \right |}}{{\left | 147573952589676412928 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 295147905179352825856 \, \sqrt {2} {\left | a \right |} - 442721857769029238784 \, a \right |}}\right )}{\sqrt {-a} {\left | a \right |} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} - \frac {2 \, {\left (\sqrt {2} A a \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) + \sqrt {2} C a \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )\right )} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}} - \frac {4 \, \sqrt {2} {\left (29 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{6} A - 133 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} A a + 55 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} A a^{2} - 7 \, A a^{3}\right )}}{{\left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} - 6 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a + a^{2}\right )}^{2} \sqrt {-a} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.98, size = 1064, normalized size = 4.90 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \sec \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )^{2}}{{\left (a \sec \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\cos \left (c+d\,x\right )}^2\,\left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )}}{\left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________